﻿using System;

namespace TypedROBIN.Imaging
{
    public class ErrorEventArgs : EventArgs
    {
        /// 
        /// StatusCode: 一般為標準HTTP Status Code, 以下列舉額外定義的錯誤代碼.
        /// 666: 產生縮圖時發生錯誤.
        /// 777: 傳入的執行參數有誤, delay < 1000 或 url == null 或 output == null.
        /// -2147024891: 存取被拒.
        /// 
        private string url;
        private int statusCode;
        private long executionTime;

        public ErrorEventArgs(string url, int statusCode, long executionTime)
        {
            this.url = url;
            this.statusCode = statusCode;
            this.executionTime = executionTime;
        }

        public string Url
        {
            get { return url; }
        }
        public int StatusCode
        {
            get { return statusCode; }
        }
        public long ExecutionTime
        {
            get { return executionTime; }
        }
    }
}
